<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<% include  ./template/commonCss.ejs %>
	<link href="<%=resUrl%>/css/collectList.css" rel="stylesheet" type="text/css" />
	<% include ./template/commonJs.ejs %>
	<% include ./template/chatLister.ejs %>
</head>
<script>
	var proType = '<%-proType%>';
</script>

<body ontouchstart> 
	<% 	
		var topTitle = '';
		switch(proType){
			case '0':
				topTitle = "仓库中的藏品";
				break;
			case '1':
				topTitle = "正在拍卖中的藏品";
				break;
			case '2':
				topTitle = "正在集市中出售的藏品";
				break;
			default:
				break;
		}		
		var topReturnType = "";
	%>
	<% include ./template/topReturn.ejs %>
	<div id="aroundBox" <%if(locals.token && token != ''){%>style="top:0;"<%}%>>
		<div class="weui-pull-to-refresh__layer" style="padding: 5px;">
			<div class="weui-pull-to-refresh__arrow"></div>
			<div class="weui-pull-to-refresh__preloader"></div>
			<div class="down">下拉刷新</div>
			<div class="up">释放刷新</div>
			<div class="refresh">正在刷新</div>
		</div>
		<div class="weipai-list" id="contentTo">
			<div class="left-list" id="left-list-content"></div>
			<div class="right-list" id="right-list-content"></div>
			<div class="auto-height"></div>
		</div>						
		<div class="weui-loadmore" id="loadmore">
			<i class="weui-loading"></i>
			<span class="weui-loadmore__tips">正在加载</span>
		</div>
		<div class="weui-loadmore weui-loadmore_line" style="display:none;" id="nomore">
			<span class="weui-loadmore__tips">到底了</span>
		</div>
	</div>
	<script id="left-list" type="text/html">
		{{each list}}
			<div class="lot">
				<div class="info">
					<a {{if $value.type==1}} href="javascript:visitUrl('/auctionCollectDetail?id={{$value.id}}',true)" {{else}} href="javascript:visitUrl('/collectDetail?id={{$value.id}}',true)" {{/if}}>
						<div class="pic"><img src="{{$value.coverImage}}?x-oss-process=image/resize,w_500"></div>
						<div class="title">{{$value.name}}</div>
						<div class="price">
							<span>¥{{$value.nowPrice}}</span>
						</div>
					</a>					
					<div class="bottom" >
						<%if(proType == 0){%>
							<a href="javascript:visitUrl('/collect/update?id={{$value.id}}&type=1&isOutStock=true',true)"><div class="bots">上传微拍</div></a>
							<a href="javascript:visitUrl('/collect/update?id={{$value.id}}&type=2&isOutStock=true',true)"><div class="bots">上传集市</div></a>
							<a href="javascript:visitUrl('/collect/update?id={{$value.id}}&type=3&isOutStock=true',true)"><div class="bots">上传专场</div></a>
							<div class="bots" onclick="delPro('{{$value.id}}');">删除</div>
						<%} else if(proType == 1){%>
							<a href="javascript:visitUrl('/collect/update?id={{$value.id}}&type=1',true)"><div class="bots">编辑</div></a>
							<div class="bots" onclick="restorePro('{{$value.id}}');">下架</div>
						<%} else if(proType == 2){%>
							<a href="javascript:visitUrl('/collect/update?id={{$value.id}}&type=2',true)"><div class="bots">编辑</div></a>
							<div class="bots" onclick="restorePro('{{$value.id}}');">下架</div>
						<%}%>  
					</div>
				</div>
			</div>
		{{/each}}
	</script>
	<script id="right-list" type="text/html">
		{{each list}}
			<div class="lot">
				<div class="info">
					<a {{if $value.type==1}} href="javascript:visitUrl('/auctionCollectDetail?id={{$value.id}}',true)" {{else}} href="javascript:visitUrl('/collectDetail?id={{$value.id}}',true)" {{/if}}>
						<div class="pic"><img src="{{$value.coverImage}}?x-oss-process=image/resize,w_500"></div>
						<div class="title">{{$value.name}}</div>
						<div class="price">
							<span>¥{{$value.nowPrice}}</span>
						</div>
					</a>					
					<div class="bottom">
						<%if(proType == 0){%>
							<a href="javascript:visitUrl('/collect/update?id={{$value.id}}&type=1&isOutStock=true',true)"><div class="bots">上传微拍</div></a>
							<a href="javascript:visitUrl('/collect/update?id={{$value.id}}&type=2&isOutStock=true',true)"><div class="bots">上传集市</div></a>
							<a href="javascript:visitUrl('/collect/update?id={{$value.id}}&type=3&isOutStock=true',true)"><div class="bots">上传专场</div></a>
							<div class="bots" onclick="delPro('{{$value.id}}');">删除</div>
						<%} else if(proType == 1){%>
							<a href="javascript:visitUrl('/collect/update?id={{$value.id}}&type=1',true)"><div class="bots">编辑</div></a>
							<div class="bots" onclick="restorePro('{{$value.id}}');">下架</div>
						<%} else if(proType == 2){%>
							<a href="javascript:visitUrl('/collect/update?id={{$value.id}}&type=2',true)"><div class="bots">编辑</div></a>
							<div class="bots" onclick="restorePro('{{$value.id}}');">下架</div>
						<%}%>
					</div>
				</div>
			</div>
		{{/each}}
	</script>
	<script type="text/javascript" src="<%=resUrl%>/js/collectList.js"></script>
</body>

</html>